//
//  SearchTopView.m
//  Cat
//
//  Created by lushitong on 2018/12/22.
//  Copyright © 2018年 lushitong. All rights reserved.
//

#import "SearchTopView.h"
#import "ItemView.h"
#import "HXTagsView.h"

@interface SearchTopView()

@property (nonatomic, strong) UILabel *infoLabel;
@property (nonatomic, strong) NSMutableArray *itemViewArray;

@end

@implementation SearchTopView

- (void)setHotsWordArray:(NSArray *)hotsWordArray {
	_hotsWordArray = hotsWordArray;
	[self.itemViewArray removeAllObjects];
}

- (instancetype)initWithFrame:(CGRect)frame {
	self = [super initWithFrame:frame];
	if (self) {
		self.backgroundColor = [UIColor whiteColor];
		[self addLoadAllView];
	}
	return self;
}

- (void)addLoadAllView {
	[self addSubviews:@[self.infoLabel]];
	[self.infoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.left.equalTo(self.mas_left).offset(kQKFitModuleDecimal(13));
		make.top.equalTo(self.mas_top).offset(kQKFitModuleDecimal(11));
	}];
}

#pragma mark----- lazy init -----

- (UILabel *)infoLabel {
	if (!_infoLabel) {
		_infoLabel = [UILabel labelWithFont:[UIFont systemFontOfSize:kQKFitModuleDecimal(12)] textColor:COLOR_WITH_HEX(0x756D68)];
		_infoLabel.text = @"热门搜索";
	}
	return _infoLabel;
}
- (NSMutableArray *)itemViewArray {
	if (!_itemViewArray) {
		_itemViewArray = [[NSMutableArray alloc] init];
	}
	return _itemViewArray;
}


@end
